import http from "../../utils/http";
import { Auth, Captcha, Menu, Menus } from "./type";

export const getCaptcha=()=>{

  return  http.get<Captcha>("/api/auth/getCaptcha");

}

export const userLogin=(data:Auth)=>{

  return  http.post<any>("/api/auth/login",data);

}
export const getPublicKey=()=>{

  return  http.get<string>("/api/auth/publicKey");

}

export const getMenus=()=>{
  return  http.get<Menus>("/api/menu/getListForUser");
}

export const wechatLogin=(code:string)=>{
  return  http.get<Menus>("/api/auth/wechat",{code});
}


